-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scalacOptions for sourcemapping github paths #706
Add scalacOptions for sourcemapping github paths #706
Conversation
The CI errors out during the JS tests: [info] [coreJS] compiling 203 Scala sources to /home/runner/work/smithy4s/smithy4s/modules/core/target/js-2.13/classes ...
[error] [coreJS] :file:/home/runner/work/smithy4s/smithy4s/.sbt/matrix/coreJS/ is not a valid URI
[error] [coreJS] one error found
[error] [coreJS] (coreJS / Compile / compileIncremental) Compilation failed
[error] Total time: 35 s, completed Jan 5, 2023, 11:58:46 PM I feel like I'm missing something here with my changes, but I can' quite figure out yet why the test fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this !
@zetashift Seconded :-)! |
val flag = | ||
if (scalaVersion.value.startsWith("3")) "-scalajs-mapSourceURI" | ||
else "-P:scalajs:mapSourceURI" | ||
val localSourcesPath = baseDirectory.value.toURI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be (LocalRootProject / baseDirectory).value.toURI.toString
, exactly like it is in sbt-typelevel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're my hero.
I'll try to get a PR that fixes it today!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @armanbilge <3
Hopefully fixes #705
Code is an amalgamation of https://github.com/typelevel/sbt-typelevel/blob/4da726ca021ea2c6459e8286d9ec49ab7c79a883/github/src/main/scala/org/typelevel/sbt/TypelevelScalaJSGitHubPlugin.scala#L34 and https://github.com/raquo/Laminar/blob/739cc0dbab319c685f28be30a1592b7d04347842/build.sbt#L76
Feedback is very much welcome, the code could be a lot simpler like the code from Laminar.